﻿using Logistics.Web.Models.Common;
using Nop.Web.Framework.Mvc;
using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Logistics.Web.Models.Track
{
    public class LogisticsPackageModel : BaseNopEntityModel
    {
        public LogisticsPackageModel()
        {
            SelectedStatus = -1;
            AvaliableAddressTypes = new List<SelectListItem>();
        }
        public int PlanId { get; set; }

        public int ShipmentId { get; set; }

        public int? WarehouseId { get; set; }

        public int PickUpLocationId { get; set; }

        public int DeliveryLocationId { get; set; }

        public DateTime CreationTime { get; set; }

        public DateTime? UpdatedTime { get; set; }

        public int Status { get; set; }

        public List<SelectListItem> StatusValues { get; set; }
        public int SelectedStatus { get; set; }
        public List<SelectListItem> FailedResponses { get; set; }
        public int SelectedFailedResponse { get; set; }

        public string TrackingNumber { get; set; }

        public AddressModel WarehouseAddress { get; set; }

        public AddressModel PickUpAddress { get; set; }

        public AddressModel DeliveryAddress { get; set; }

        public List<SelectListItem> AvaliableAddressTypes { get; set; }
        public int? SelectedAddressTypeId { get; set; }
        public int VerifyAddressId { get; set; }

        // This is to help driver know how many packages within the plan 
        // is tied to the same location (either for pickup or dropoff)
        // when driver is at the location. (incl. the current package itself).
        public int? SamePickupLocationNumItems { get; set; }
        public int? SameDeliveryLocationNumItems { get; set; }

        public string Attribute { get; set; }
        public string Reference { get; set; }
        public string PackageNote { get; set; }

        public string OrderBy { get; set; }
    }
}